package com.liao.product.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liao.common.entity.product.WareTaskEntity;
import com.liao.common.utils.PageUtils;
import com.liao.common.utils.Query;
import com.liao.product.dao.WareTaskDao;
import com.liao.product.service.WareTaskService;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("wareTaskService")
public class WareTaskServiceImpl extends ServiceImpl<WareTaskDao, WareTaskEntity> implements WareTaskService {


    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<WareTaskEntity> page = this.page(
                new Query<WareTaskEntity>().getPage(params),
                new QueryWrapper<WareTaskEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public WareTaskEntity getTaskById(Long id) {
        WareTaskEntity wareTask = baseMapper.selectOne(new QueryWrapper<WareTaskEntity>().eq("id", id));
        return wareTask;
    }


}